A programmable logic controller (PLC) is a device which is used to control or regulate a machine or installation and is digitally programmed.
In the simplest case, a PLC has inputs, outputs, an operating system (firmware) and an interface which can be used to load the user program. The user program defines how the outputs are intended to be switched on the basis of the inputs. Drive control (motion control, speed control with controlled acceleration or deceleration) is also implemented using PLCs.
The operating system (firmware) ensures that the current state of the transducers is always available to the user program. The user program can use this information to switch the outputs in such a manner that the machine or installation operates in the desired manner.
The PLC is connected to the machine or installation using sensors and actuators. The sensors are connected to the inputs of the PLC and communicate the events in the machine or installation to the PLC. Examples of sensors are, for example, light barriers, incremental encoders, limit switches or else temperature sensors, level sensors etc. The actuators are connected to the outputs of the PLC and make it possible to control the machine or installation. Examples of actuators are contactors for switching on electric motors, electric valves for hydraulics or compressed air.
The sensors and actuators are increasingly being connected to the PLC via a field bus and no longer in a discrete manner. This reduces the wiring complexity. Not only sensors and actuators but parts of the PLC, such as input and output subassemblies, have also been connected to a central station for some time via a bus and (bus) interface modules (decentralized peripherals). In modern installations, the bus systems are removed from networks (for example SERCOS III, Profi-Net) or are supplemented with the latter. Networks (Ethernet) are more flexible and faster than bus systems.
When automating machines and installations, the aspect of effective engineering is becoming increasingly important in addition to the functionalities provided by an automation solution. This involves, in particular, clearly mapping an application with efficient program code in a short time. There are peculiarities, in particular, when automating motion applications in which an essential part involves moving shafts in a coordinated manner. Therefore, the machine manufacturers have developed programming tools in order to simplify the generation of user program code for PLCs. Programming is usually effected using corresponding software on a programming device (for example an application in Microsoft Windows or Linux on a PC or a tailored system).
The programming tools already contain programming templates with predefined program code in order to easily implement fundamental machine sequences, for example error detection and response, or typical machine operating modes such as “initialization”, “automatic” for the production mode and “manual” for manually moving the drives. Against this background, the applicant, for example, provides, as a programming template, the so-called generic application template (GAT) which makes it possible to easily and quickly develop clear logic applications. Peculiarities of motion applications are taken into account. On the basis of a program framework according to IEC61131-3, said template makes it possible to easily and quickly develop applications together with a dialog-based wizard. It also supports the peculiarities of motion applications, for example the handling of shafts. Programming templates provide, for example, predefined state machines and interfaces for adapting the state machines. The programming template usually has the GAT wizard elements in the programming interface, state machine or machine modules as a PLC user program and visualization elements.
The GAT wizard is used to configure the programming template under dialog control. These dialogs are used, for example, to manage operating modes and states, machine modules, shafts and visualizations. In this case, the state machine is constructed (automatically generated) in the background as a PLC user program. The user must then still program the function of the machine in the different states. Using the wizard, the user can jump, in a relatively simple manner, to the corresponding location in the PLC programming system in order to insert PLC user program code there. The automatically generated PLC user program is a program framework within which the user programs the states or state transitions, for example. As a result of the structure being displayed in the GAT wizard, the programmer always keeps an overview. This simplifies the so-called top-down program development for the user.
This automatic program generation is intended to be improved with regard to the energy consumption of the controlled machine. In particular, idling phases are scarcely taken into account in many PLC user programs, with the result that there is a need for improvement here.